<% if @students.nil?|| @students.empty? %><%= "end" -%>
<% else %>
    <% index = params[:start].to_i %>
    <% @students.each do |student| %>
        <tr>
          <% index =index+1 %>
          <td><%= index %></td>
          <td><%= student.studentId %></td>
          <td><%= student.fid %></td>
          <td><%= student.name %></td>
          <td><%= student.grade %></td>
          <td><%= student.university %></td>
          <td><%= student.college %></td>
          <td><%= student.major %></td>
          <td><%= student.sgroup %></td>
          <td><%= {0=>"男", 1=>"女"}[student.gender] %></td>
          <!--<td><%= student.studentAddr %></td>-->
          <!--<td><%= student.graduationTime.strftime("%Y/%m") if !student.graduationTime.nil? %></td>-->
          <td><%= link_to('出勤', "/student/attendance/"<<student.id.to_s) %>
            <%= link_to '成绩', "/student/scores/"<<student.id.to_s %>
            <%= link_to '详细', student %>
            <%= link_to '编辑', edit_student_path(student) %>
            <%= link_to '删除', student, confirm: '删除本学生信息同时会删除此学生所有课程的出勤信息和成绩信息!确认删除?', method: :delete %></td>
        </tr>
    <% end %>
<% end %>